<div id="agent">
    <div class="nav">
        <div class="nav-li focus">市代登记</div>
        <a href="#admin/agentlist">
            <div class="nav-li">市代列表</div>
        </a>
        <a href="#admin/agentsetting">
            <div class="nav-li">市代收益</div>
        </a>
    </div>
    <hr />
    <div class="agent">
        <table>
            <tr>
                <td colspan="10" class="stitle">
                    基本信息
                </td>
            </tr>
            <tr>
                <td class="title">姓名</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.real_name'}}" bind-value="{{$Cache.admin.agent.info.real_name}}" type="text" placeholder="姓名" />
                </td>
                <td class="title">生日</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.birthday'}}" bind-value="{{$Cache.admin.agent.info.birthday}}" type="date" placeholder="生日" />
                </td>
                <td class="title">手机号</td>
                <td class="input">
                    {{#if $Cache.admin.agent.is_update}}
                    {{$Cache.admin.agent.info.user_info.info.mobile_phone}}
                    {{#else}}
                    <input bind-input="{{'$Cache.admin.agent.info.user_info.mobile_phone'}}" type="text" placeholder="手机号" />
                    {{/if}}
                </td>
                <td class="title">身份证</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.id_card'}}" bind-value="{{$Cache.admin.agent.info.id_card}}" type="text" placeholder="身份证号码" />
                </td>
                <td colspan="2" rowspan="2" class="input">
                    <img bind-src="{{$Cache.admin.agent.info.agent_img||'http://i1.mb5u.com/img/dface.jpg'}}" />
                    <button disabled="{{$Cache.admin.agent.isuploadimg}}" onclick="javascript:document.getElementById('agentimg').click()">{{$Cache.admin.agent.isuploadimg?"正在上传":"上传头像(120*240)"}}</button>
                    <input event-change="{{'$Event.admin.agent.upload_head_img'}}" type="file" accept="image/*" id="agentimg" style="display: none;" />
                </td>
            </tr>
            <tr>
                <td class="title">
                    邮箱
                </td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.email'}}" bind-value="{{$Cache.admin.agent.info.email}}" type="text" placeholder="邮箱" />
                </td>
                <td class="title">
                    固定电话
                </td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.area_code'}}" bind-value="{{$Cache.admin.agent.info.area_code}}" class="small" type="text" placeholder="区号" /> -
                    <input bind-input="{{'$Cache.admin.agent.info.phone'}}" bind-value="{{$Cache.admin.agent.info.phone}}" type="text" placeholder="电话号码" />
                </td>
                <td class="title">
                    地址
                </td>
                <td class="input" colspan="3">
                    <input bind-input="{{'$Cache.admin.agent.info.address'}}" bind-value="{{$Cache.admin.agent.info.address}}" class="wid" type="text" placeholder="详细居住地址" />
                </td>
            </tr>
            <tr>
                <td colspan="10" class="stitle">
                    代理信息
                </td>
            </tr>
            <tr>
                <td class="title">
                    公司
                </td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.company'}}" bind-value="{{$Cache.admin.agent.info.company}}" type="text" placeholder="代理人公司(选填)" />
                </td>
                <td class="title">
                    代理费用
                </td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.cost'}}" bind-value="{{$Cache.admin.agent.info.cost}}" type="text" placeholder="代理费用" />
                </td>
                <td class="title">
                    代理城市
                </td>
                <td class="input" colspan="5">
                    {{#if $Cache.admin.agent.is_update}}
                    {{$Cache.admin.agent.info.province_name}} - {{$Cache.admin.agent.info.city_name}}
                    {{#else}}
                    <select bind-input="{{'$Cache.admin.agent.info.province_name'}}" bind-value="{{$Cache.admin.agent.info.province_name}}" class="province" name="province" event-change="{{'$Event.province'}}">
                        <option class="first" value="0">--请选择省--</option>
                        {{#each city_list}}
                        <option rel="{{region_id}}" value="{{region_name}}">
                            {{region_name}}
                        </option>
                        {{/each}}
                    </select>
                    <select bind-input="{{'$Cache.admin.agent.info.city_name'}}" bind-value="{{$Cache.admin.agent.info.city_name}}" class="city" name="city" disabled event-change="{{'$Event.city'}}">
                        <option class="first" value="0">--请选择市--</option>
                    </select>
                    {{/if}}
                </td>
            </tr>
            <tr>
                <td class="title">银行卡号</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.bank_number'}}" bind-value="{{$Cache.admin.agent.info.bank_number}}" type="text" placeholder="银行卡号" />
                </td>
                <td class="title">开户行</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.bank'}}" bind-value="{{$Cache.admin.agent.info.bank}}" type="text" placeholder="开户行" />
                </td>
                <td class="title">开户人</td>
                <td class="input">
                    <input bind-input="{{'$Cache.admin.agent.info.bank_account'}}" bind-value="{{$Cache.admin.agent.info.bank_account}}" type="text" placeholder="开户人" />
                </td>
                <td class="title">开户网点</td>
                <td class="input" colspan=" 3 ">
                    <input bind-input="{{'$Cache.admin.agent.info.bank_branch'}}" bind-value="{{$Cache.admin.agent.info.bank_branch}}" class="wid" type="text" placeholder="开户网点" />
                </td>
            </tr>
            <tr>
                <td class="title">介绍人</td>
                <td class="input" colspan="10">
                    {{#if $Cache.admin.agent.is_update}}
                    {{$Cache.admin.agent.info.introducer}}
                    {{#else}}
                    <input bind-input="{{'$Cache.admin.agent.info.introducer'}}" bind-value="{{$Cache.admin.agent.info.introducer}}" type="text" maxlength="11" placeholder="介绍人手机号（选填）" />
                    {{/if}}
                </td>
            </tr>
        </table>
        <button event-click="{{'$Event.admin.agent.submit'}}">提交</button>
    </div>
</div>
